Socket
Socket
Sign inDemoInstall

browserify-versionify

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-versionify

Browserify transform to replace placeholder with package version


Version published
Maintainers
1
Created
Source

browserify-versionify

Browserify transform to replace placeholder with package version.

By default, it replaces __VERSION__ with the version from package.json in your source code. E.g. before:

var version = '__VERSION__';

after:

var version = '1.0.0';

Usage

From command line:

browserify -t browserify-versionify

From Node.js:

browserify().transform('browserify-versionify');

// Configure (default values shown)
browserify().transform('browserify-versionify', {
    placeholder: '__VERSION__',
    version: pkg.version
});

You can also provide a filter property to whitelist files to apply the transform to (e.g. filter: /\.js$/).

You can also add the transform to your package.json:

{
    "browserify": {
        "transform": [
            "browserify-versionify"
        ]
    }
}

Keywords

FAQs

Package last updated on 17 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc